<template>
	<view>
		<view>
			<u-notify ref="uNotify" message="Hi uView"></u-notify>
			<u--textarea v-model="value2" placeholder="请输入内容" count ></u--textarea>
			<br>
			<u-button 
			size="large" 
			color="rgb(85, 170, 255)" 
			style="width: 40%; text-align: center;" 
			@click=submit()>
			<text style="color: rgb(255, 255, 255);">提交</text>
			</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:{},
				id:'',
				value2: ''
			}
		},
		methods: {	
			submit(){
				/* alert(this.value2) */
				this.list.stuConclusion = this.value2;
				this.list.id = this.id
				this.$axios.post("/mockinterview/mockInterview/submit",this.list).then((res)=>{
					if(res.data.success){
						uni.redirectTo({
							url: '/pages/service/practicaltrainingservice/mockinterview/mockinterview',
							});
					}else{
						this.$refs.uNotify.show({
													top: 45,
													type: 'error',
													color: 'white',
													bgColor: 'Rubber Ducky Yellow',
													message: '提交失败！',
													duration: 1000 * 3,
													fontSize: 14,
													safeAreaInsetTop:true
												})
					}
				})
			}
		},
		onLoad: function (option) { //option为object类型，会序列化上个页面传递的参数
					this.id = option.id;//面试结果编号
				},
	}
</script>

<style>

</style>
